package cn.akwangl.spring.bean.factory;

import cn.akwangl.spring.ioc.model.User;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.FactoryBean;

/**
 * 通过 {@link BeanFactory} 接口创建{@link User}对象
 *
 * @param
 * @author youyongkun
 * @return
 * @date 2021/6/30 14:26
 */
public class UserFactoryBean implements FactoryBean<User> {
    @Override
    public User getObject() throws Exception {
        return User.createUser();
    }

    @Override
    public Class<?> getObjectType() {
        return User.class;
    }
}
